<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>NVTX C API Reference: nvtxSyncUserAttributes_t Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">NVTX C API Reference<span id="projectnumber">&#160;v3</span>
   </div>
   <div id="projectbrief">NVIDIA Tools Extension Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.5 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle"><div class="title">nvtxSyncUserAttributes_t Struct Reference<div class="ingroups"><a class="el" href="group___s_y_n_c_h_r_o_n_i_z_a_t_i_o_n.html">Synchronization</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>User Defined Synchronization Object Attributes Structure. <a class="anchor" id="USERDEF_SYNC_ATTRIBUTES_STRUCTURE"></a>.  
 <a href="structnvtx_sync_user_attributes__v0.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="nv_tools_ext_sync_8h_source.html">nvToolsExtSync.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:a5f765c007f7b252496240c4fd9e833b8"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnvtx_sync_user_attributes__v0.html#a5f765c007f7b252496240c4fd9e833b8">version</a></td></tr>
<tr class="memdesc:a5f765c007f7b252496240c4fd9e833b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Version flag of the structure.  <a href="structnvtx_sync_user_attributes__v0.html#a5f765c007f7b252496240c4fd9e833b8">More...</a><br /></td></tr>
<tr class="separator:a5f765c007f7b252496240c4fd9e833b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad55d1c1734d77c23863234c28667a4e1"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnvtx_sync_user_attributes__v0.html#ad55d1c1734d77c23863234c28667a4e1">size</a></td></tr>
<tr class="memdesc:ad55d1c1734d77c23863234c28667a4e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of the structure.  <a href="structnvtx_sync_user_attributes__v0.html#ad55d1c1734d77c23863234c28667a4e1">More...</a><br /></td></tr>
<tr class="separator:ad55d1c1734d77c23863234c28667a4e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab31b719d75e5a4b64a7052327c2db023"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnvtx_sync_user_attributes__v0.html#ab31b719d75e5a4b64a7052327c2db023">messageType</a></td></tr>
<tr class="memdesc:ab31b719d75e5a4b64a7052327c2db023"><td class="mdescLeft">&#160;</td><td class="mdescRight">Message type specified in this attribute structure.  <a href="structnvtx_sync_user_attributes__v0.html#ab31b719d75e5a4b64a7052327c2db023">More...</a><br /></td></tr>
<tr class="separator:ab31b719d75e5a4b64a7052327c2db023"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af0a877617fbf058cc2b6ee5c97a28ca6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="unionnvtx_message_value__t.html">nvtxMessageValue_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnvtx_sync_user_attributes__v0.html#af0a877617fbf058cc2b6ee5c97a28ca6">message</a></td></tr>
<tr class="memdesc:af0a877617fbf058cc2b6ee5c97a28ca6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Message assigned to this attribute structure.  <a href="structnvtx_sync_user_attributes__v0.html#af0a877617fbf058cc2b6ee5c97a28ca6">More...</a><br /></td></tr>
<tr class="separator:af0a877617fbf058cc2b6ee5c97a28ca6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >User Defined Synchronization Object Attributes Structure. <a class="anchor" id="USERDEF_SYNC_ATTRIBUTES_STRUCTURE"></a>. </p>
<p >This structure is used to describe the attributes of a user defined synchronization object. The layout of the structure is defined by a specific version of the tools extension library and can change between different versions of the Tools Extension library.</p>
<dl class="section user"><dt>Initializing the Attributes</dt><dd></dd></dl>
<p>The caller should always perform the following three tasks when using attributes: </p><ul>
<li>
Zero the structure </li>
<li>
Set the version field </li>
<li>
Set the size field </li>
</ul>
<p >Zeroing the structure sets all the event attributes types and values to the default value.</p>
<p >The version and size field are used by the Tools Extension implementation to handle multiple versions of the attributes structure.</p>
<p >It is recommended that the caller use one of the following to methods to initialize the event attributes structure:</p>
<dl class="section user"><dt>Method 1: Initializing nvtxEventAttributes for future compatibility</dt><dd><div class="fragment"><div class="line">nvtxSyncUserAttributes_t attribs = {0};</div>
<div class="line">attribs.version = <a class="code hl_define" href="nv_tools_ext_8h.html#a270c1573fb02bc9f15825438913a255c">NVTX_VERSION</a>;</div>
<div class="line">attribs.size = NVTX_SYNCUSER_ATTRIB_STRUCT_SIZE;</div>
<div class="ttc" id="anv_tools_ext_8h_html_a270c1573fb02bc9f15825438913a255c"><div class="ttname"><a href="nv_tools_ext_8h.html#a270c1573fb02bc9f15825438913a255c">NVTX_VERSION</a></div><div class="ttdeci">#define NVTX_VERSION</div><div class="ttdef"><b>Definition:</b> <a href="nv_tools_ext_8h_source.html#l00155">nvToolsExt.h:155</a></div></div>
</div><!-- fragment --></dd></dl>
<dl class="section user"><dt>Method 2: Initializing nvtxSyncUserAttributes_t for a specific version</dt><dd><div class="fragment"><div class="line">nvtxSyncUserAttributes_t attribs = {0};</div>
<div class="line">attribs.version = 1;</div>
<div class="line">attribs.size = (uint16_t)(<span class="keyword">sizeof</span>(nvtxSyncUserAttributes_t));</div>
</div><!-- fragment --></dd></dl>
<p>If the caller uses Method 1 it is critical that the entire binary layout of the structure be configured to 0 so that all fields are initialized to the default value.</p>
<p >The caller should either use both NVTX_VERSION and NVTX_SYNCUSER_ATTRIB_STRUCT_SIZE (Method 1) or use explicit values and a versioned type (Method 2). Using a mix of the two methods will likely cause either source level incompatibility or binary incompatibility in the future.</p>
<dl class="section user"><dt>Settings Attribute Types and Values</dt><dd></dd></dl>
<dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line"><span class="comment">// Initialize</span></div>
<div class="line">nvtxSyncUserAttributes_t attribs = {0};</div>
<div class="line">attribs.version = <a class="code hl_define" href="nv_tools_ext_8h.html#a270c1573fb02bc9f15825438913a255c">NVTX_VERSION</a>;</div>
<div class="line">attribs.size = NVTX_SYNCUSER_ATTRIB_STRUCT_SIZE;</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Configure the Attributes</span></div>
<div class="line">attribs.messageType = <a class="code hl_enumvalue" href="group___g_e_n_e_r_a_l.html#ggaf74d5ab5269ee3c1de7aa0059ca31c46aad30a1fb6651b7f2c36d8d19ade74576">NVTX_MESSAGE_TYPE_ASCII</a>;</div>
<div class="line">attribs.message.ascii = <span class="stringliteral">&quot;Example&quot;</span>;</div>
<div class="ttc" id="agroup___g_e_n_e_r_a_l_html_ggaf74d5ab5269ee3c1de7aa0059ca31c46aad30a1fb6651b7f2c36d8d19ade74576"><div class="ttname"><a href="group___g_e_n_e_r_a_l.html#ggaf74d5ab5269ee3c1de7aa0059ca31c46aad30a1fb6651b7f2c36d8d19ade74576">NVTX_MESSAGE_TYPE_ASCII</a></div><div class="ttdeci">@ NVTX_MESSAGE_TYPE_ASCII</div><div class="ttdef"><b>Definition:</b> <a href="nv_tools_ext_8h_source.html#l00285">nvToolsExt.h:285</a></div></div>
</div><!-- fragment --></dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group___s_y_n_c_h_r_o_n_i_z_a_t_i_o_n.html#gafa5155c0890472bcaaba59e8a20c397e" title="Create a user defined synchronization object This is used to track non-OS synchronization working wit...">nvtxDomainSyncUserCreate</a> </dd></dl>

<p class="definition">Definition at line <a class="el" href="nv_tools_ext_sync_8h_source.html#l00223">223</a> of file <a class="el" href="nv_tools_ext_sync_8h_source.html">nvToolsExtSync.h</a>.</p>
</div><h2 class="groupheader">Field Documentation</h2>
<a id="af0a877617fbf058cc2b6ee5c97a28ca6" name="af0a877617fbf058cc2b6ee5c97a28ca6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af0a877617fbf058cc2b6ee5c97a28ca6">&#9670;&#160;</a></span>message</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="unionnvtx_message_value__t.html">nvtxMessageValue_t</a> nvtxSyncUserAttributes_t::message</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Message assigned to this attribute structure. </p>
<p >The text message that is attached to an event. </p>

<p class="definition">Definition at line <a class="el" href="nv_tools_ext_sync_8h_source.html#l00255">255</a> of file <a class="el" href="nv_tools_ext_sync_8h_source.html">nvToolsExtSync.h</a>.</p>

</div>
</div>
<a id="ab31b719d75e5a4b64a7052327c2db023" name="ab31b719d75e5a4b64a7052327c2db023"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab31b719d75e5a4b64a7052327c2db023">&#9670;&#160;</a></span>messageType</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t nvtxSyncUserAttributes_t::messageType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Message type specified in this attribute structure. </p>
<p >Defines the message format of the attribute structure's <a class="el" href="structnvtx_sync_user_attributes__v0.html#af0a877617fbf058cc2b6ee5c97a28ca6">message</a> field.</p>
<p >Default Value is NVTX_MESSAGE_UNKNOWN </p>

<p class="definition">Definition at line <a class="el" href="nv_tools_ext_sync_8h_source.html#l00249">249</a> of file <a class="el" href="nv_tools_ext_sync_8h_source.html">nvToolsExtSync.h</a>.</p>

</div>
</div>
<a id="ad55d1c1734d77c23863234c28667a4e1" name="ad55d1c1734d77c23863234c28667a4e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad55d1c1734d77c23863234c28667a4e1">&#9670;&#160;</a></span>size</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t nvtxSyncUserAttributes_t::size</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Size of the structure. </p>
<p >Needs to be set to the size in bytes of the event attribute structure used to specify the event. </p>

<p class="definition">Definition at line <a class="el" href="nv_tools_ext_sync_8h_source.html#l00240">240</a> of file <a class="el" href="nv_tools_ext_sync_8h_source.html">nvToolsExtSync.h</a>.</p>

</div>
</div>
<a id="a5f765c007f7b252496240c4fd9e833b8" name="a5f765c007f7b252496240c4fd9e833b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5f765c007f7b252496240c4fd9e833b8">&#9670;&#160;</a></span>version</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t nvtxSyncUserAttributes_t::version</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Version flag of the structure. </p>
<p >Needs to be set to NVTX_VERSION to indicate the version of NVTX APIs supported in this header file. This can optionally be overridden to another version of the tools extension library. </p>

<p class="definition">Definition at line <a class="el" href="nv_tools_ext_sync_8h_source.html#l00232">232</a> of file <a class="el" href="nv_tools_ext_sync_8h_source.html">nvToolsExtSync.h</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="nv_tools_ext_sync_8h_source.html">nvToolsExtSync.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
